<template>
    <div>
        <h2>我是child组件</h2>
        <button @click="handle">累加app中的count</button>
        <button @click="off">解绑</button>
    </div>
</template>

<script>
export default {
    name: "Child",
    methods: {
        handle() {
            this.$emit("changeCount", 2);
        },
        off() {
            /* 解绑 */
            // this.$off("changeCount");
            this.$off(["changeCount"]);
        },
    },
};
</script>
